package com.spark.invoicings.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;

/**
 * 采购明细表
 * 
 * @author sunyan
 * @email sunyan@gmail.com
 * @date 2024-06-13 11:15:03
 */
@Data
@TableName("t_purchase_detail")
public class PurchaseDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 采购明细id
	 */
	@TableId(type = IdType.AUTO)
	private Integer purchaseDetailId;
	/**
	 * 所属采购单
	 */
	private Integer purchaseOrderId;
	/**
	 * 商品id
	 */
	private Integer productId;
	/**
	 * 采购数量
	 */
	private Integer purchaseQuantity;
	/**
	 * 采购单价
	 */
	private double purchasePrice;
	/**
	 * 采购总额
	 */
	private double totalPurchaseAmount;
	/**
	 * 实际到货时间
	 */
	private Date actualArrivalDate;
	/**
	 * 待到货数量
	 */
	private Integer pendingArrivalQuantity;
	/**
	 * 已到货数量
	 */
	private Integer arrivedQuantity;
	/**
	 * 审批中数量
	 */
	private Integer pendingApprovalQuantity;
	/**
	 * 已驳回数量
	 */
	private Integer rejectedQuantity;
	/**
	 * 已退货数量
	 */
	private Integer returnedQuantity;
	/**
	 * 应付金额
	 */
	private double payableAmount;
	/**
	 * 待付款金额
	 */
	private double pendingPaymentAmount;
	/**
	 * 入库单明细表关联对象
	 *
	 * */
	@TableField(exist = false)
	private List<InboundDetail> inboundDetails;

	/**
	 * 订单明细id
	 */
	private Integer orderDetailId;

	/**
	 * 采购订单对象
	 */
	@TableField(exist = false)
	private Order order;

	@TableField(exist = false)
	private OrderDetail orderDetail;

	@TableField(exist = false)
	private SalesOrder salesOrder;

	/**
	 * 产品对象
	 */
	@TableField(exist = false)
	private Product product;

	public SalesOrder getSalesOrder() {
		return salesOrder;
	}

	public void setSalesOrder(SalesOrder salesOrder) {
		this.salesOrder = salesOrder;
	}

	public OrderDetail getOrderDetail() {
		return orderDetail;
	}

	public void setOrderDetail(OrderDetail orderDetail) {
		this.orderDetail = orderDetail;
	}

	public Integer getPurchaseDetailId() {
		return purchaseDetailId;
	}

	public void setPurchaseDetailId(Integer purchaseDetailId) {
		this.purchaseDetailId = purchaseDetailId;
	}

	public Integer getPurchaseOrderId() {
		return purchaseOrderId;
	}

	public void setPurchaseOrderId(Integer purchaseOrderId) {
		this.purchaseOrderId = purchaseOrderId;
	}

	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	public Integer getPurchaseQuantity() {
		return purchaseQuantity;
	}

	public void setPurchaseQuantity(Integer purchaseQuantity) {
		this.purchaseQuantity = purchaseQuantity;
	}

	public double getPurchasePrice() {
		return purchasePrice;
	}

	public void setPurchasePrice(double purchasePrice) {
		this.purchasePrice = purchasePrice;
	}

	public double getTotalPurchaseAmount() {
		return totalPurchaseAmount;
	}

	public void setTotalPurchaseAmount(double totalPurchaseAmount) {
		this.totalPurchaseAmount = totalPurchaseAmount;
	}

	public Date getActualArrivalDate() {
		return actualArrivalDate;
	}

	public void setActualArrivalDate(Date actualArrivalDate) {
		this.actualArrivalDate = actualArrivalDate;
	}

	public Integer getPendingArrivalQuantity() {
		return pendingArrivalQuantity;
	}

	public void setPendingArrivalQuantity(Integer pendingArrivalQuantity) {
		this.pendingArrivalQuantity = pendingArrivalQuantity;
	}

	public Integer getArrivedQuantity() {
		return arrivedQuantity;
	}

	public void setArrivedQuantity(Integer arrivedQuantity) {
		this.arrivedQuantity = arrivedQuantity;
	}

	public Integer getPendingApprovalQuantity() {
		return pendingApprovalQuantity;
	}

	public void setPendingApprovalQuantity(Integer pendingApprovalQuantity) {
		this.pendingApprovalQuantity = pendingApprovalQuantity;
	}

	public Integer getRejectedQuantity() {
		return rejectedQuantity;
	}

	public void setRejectedQuantity(Integer rejectedQuantity) {
		this.rejectedQuantity = rejectedQuantity;
	}

	public Integer getReturnedQuantity() {
		return returnedQuantity;
	}

	public void setReturnedQuantity(Integer returnedQuantity) {
		this.returnedQuantity = returnedQuantity;
	}

	public double getPayableAmount() {
		return payableAmount;
	}

	public void setPayableAmount(double payableAmount) {
		this.payableAmount = payableAmount;
	}

	public double getPendingPaymentAmount() {
		return pendingPaymentAmount;
	}

	public void setPendingPaymentAmount(double pendingPaymentAmount) {
		this.pendingPaymentAmount = pendingPaymentAmount;
	}

	public List<InboundDetail> getInboundDetails() {
		return inboundDetails;
	}

	public void setInboundDetails(List<InboundDetail> inboundDetails) {
		this.inboundDetails = inboundDetails;
	}

	public Integer getOrderDetailId() {
		return orderDetailId;
	}

	public void setOrderDetailId(Integer orderDetailId) {
		this.orderDetailId = orderDetailId;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}
}
